MV_CC_EnumDevicesEx

MV_CC_EnumDevicesEx

Enumerate all the devices of specified transport protocol and manufacturer in subnet.

API Definition

int MV_CC_EnumDevicesEx(
  unsigned int              nTLayerType,
  MV_CC_DEVICE_INFO_LIST    *pstDevList,
  const char                *pManufacturerName
);

Parameters

nTLayerType

[IN] Transport layer protocol type, indicated by bit, supporting multiple selections, available protocol types are shown in the table below:

Macro Definition

Value

Description

MV_UNKNOW_DEVICE

0x00000000

Unknown device type

MV_GIGE_DEVICE

0x00000001

GigE device

MV_1394_DEVICE

0x00000002

1394-a/b device

MV_USB_DEVICE

0x00000004

USB3.0 device

MV_CAMERALINK_DEVICE

0x00000008

CameraLink device

For example, if nTLayerType = MV_GIGE_DEVICE | MV_USB_DEVICE, which means searching GigE and USB 3.0 device.

pstDevList

[OUT] Device information list, see the structure MV_CC_DEVICE_INFO_LIST for details.

pManufacturerName

[IN] Manufacturer name, for example, "abc"-enumerate abc cameras.

Return Value

Return MV_OK(0) on success, and return Error Code on failure.

The following sample code is for reference only.

#include "MvCameraControl.h"

void main()
{
    unsigned int nTLayerType = MV_GIGE_DEVICE | MV_USB_DEVICE;

    MV_CC_DEVICE_INFO_LIST m_stDevList = {0};
    int nRet = MV_CC_EnumDevicesEx(nTLayerType, &m_stDevList, "abc");
    if (MV_OK != nRet)
    {
        printf("error: EnumDevicesEx fail [%x]\n", nRet);
    }
}

MV_CC_EnumDevicesEx

Enumerate all the devices of specified transport protocol and manufacturer in subnet.

API Definition

int MV_CC_EnumDevicesEx(
  unsigned int              nTLayerType,
  MV_CC_DEVICE_INFO_LIST    *pstDevList,
  const char                *pManufacturerName
);

Parameters

nTLayerType

[IN] Transport layer protocol type, indicated by bit, supporting multiple selections, available protocol types are shown in the table below:

Macro Definition

Value

Description

MV_UNKNOW_DEVICE

0x00000000

Unknown device type

MV_GIGE_DEVICE

0x00000001

GigE device

MV_1394_DEVICE

0x00000002

1394-a/b device

MV_USB_DEVICE

0x00000004

USB3.0 device

MV_CAMERALINK_DEVICE

0x00000008

CameraLink device

For example, if nTLayerType = MV_GIGE_DEVICE | MV_USB_DEVICE, which means searching GigE and USB 3.0 device.

pstDevList

[OUT] Device information list, see the structure MV_CC_DEVICE_INFO_LIST for details.

pManufacturerName

[IN] Manufacturer name, for example, "abc"-enumerate abc cameras.

Return Value

Return MV_OK(0) on success, and return Error Code on failure.

The following sample code is for reference only.

#include "MvCameraControl.h"

void main()
{
    unsigned int nTLayerType = MV_GIGE_DEVICE | MV_USB_DEVICE;

    MV_CC_DEVICE_INFO_LIST m_stDevList = {0};
    int nRet = MV_CC_EnumDevicesEx(nTLayerType, &m_stDevList, "abc");
    if (MV_OK != nRet)
    {
        printf("error: EnumDevicesEx fail [%x]\n", nRet);
    }
}